package com.example.demo.init;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import com.example.demo.service.storage.StorageService;

/**
 * 初始化存储目录
 * @see 参考来源：https://www.jianshu.com/p/13980d3ee7fd
 *
 */
@Component
public class StorageInit implements CommandLineRunner {
	@Autowired
	StorageService storageService;
	@Override
	public void run(String... args) throws Exception {
		storageService.init();
	}

}
